import request from "@/utils/request.js";

/**
 * 获取分类数据
 * @param id
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const getCategoryAPI = (id)=>{
   return request({
       method:'GET',
       url:'/category',
       params:{
           id
       }
   })
}
export const getCategoryFilterAPI = (id) => {
  return request({
    method: 'GET',
    url: '/category/sub/filter',
    params: {
      id
    }
  })
}

export const getSubCategoryAPI = (data) => {
    return request({
        url:'/category/goods/temporary',
        method:'POST',
        data
    })
}